import React, { Component } from "react";
import store from "./store";

class App extends Component {
  state = {};
  render() {
    return (
      <>
        <h2>react结合redux</h2>
        <button>-</button>
        {/* 仓库数据这样写是没有响应式的 */}
        <span>{store.getState().count}</span>
        <button onClick={() => store.dispatch({ type: "add" })}>+</button>
      </>
    );
  }
}

export default App;
